package com.dmap.community.service.community.impl;

import com.dmap.community.dao.ThemeReportMapper;
import com.dmap.community.po.ThemeReport;
import com.dmap.community.po.ThemeReportExample;
import com.dmap.community.service.community.ReportService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * \* User: silent
 * \* Date: 14/11/17 Time: 19:10
 * \* Description:
 * \
 */
@Service
public class ReportServiceImpl implements ReportService {
    @Resource
    private ThemeReportMapper themeReportMapper;

    @Override
    public int insetReportTheme() {
        return 0;
    }

    @Override
    public List<ThemeReport> selectThemeReport(int pageIndex, int pageSize) {
        ThemeReportExample themeReportExample = new ThemeReportExample();
        themeReportExample.setLimitStart((pageIndex - 1) * pageSize);
        themeReportExample.setLimitEnd(pageSize);
        return themeReportMapper.selectByExample(themeReportExample);
    }
}
